/**
 * @author lscl
 * @version 1.0
 * @intro:
 */
public class Demo05_强制类型转换 {

    public static void main(String[] args) {

        // 强制类型转换
//        int a = (int)1.9;
//
//        System.out.println(a);          // 丢失精度


        // -128~127
       /* byte a = 10;

        int b = 200;

        byte c = (byte) (a + b);        // 数据错乱

        System.out.println(c);*/


        byte a =10;

        short b =20;


        short v =(short) (a+b);

        System.out.println(v);

    }
}
